#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>



int main()
{
int qwertyuiopqwetuioxcvbnm[10];
int aaaaaaa=getpid();
int MIN = 0, asdfghjklasdfghjklasdfhklsd, i;
scanf ("%d\n", &asdfghjklasdfghjklasdfhklsd);
for (i = 1; i <= asdfghjklasdfghjklasdfhklsd; ++i) {scanf ("%d", &qwertyuiopqwetuioxcvbnm[i]);if (qwertyuiopqwetuioxcvbnm[i] > MIN) MIN = qwertyuiopqwetuioxcvbnm[i];} 
	if (asdfghjklasdfghjklasdfhklsd % 2 == 0) asdfghjklasdfghjklasdfhklsd += 1; for (i = 1; i <= asdfghjklasdfghjklasdfhklsd; ++i){int ommmmmmgggggggggggggggggggasdfasdf = fork ();if (ommmmmmgggggggggggggggggggasdfasdf == 0)
{int pid = getpid ();int k = abs (pid - aaaaaaa); if ((k >= 1) && (k <= MIN))
{sleep (qwertyuiopqwetuioxcvbnm[k]); printf ("%d\n", qwertyuiopqwetuioxcvbnm[k]); }}}sleep (MIN);


























return 0;
}
